$(function(){
    getListData();
    function getListData(){
        $.ajax({
            type: "get",
            url: "http://193.112.55.79:9090/api/getindexmenu",
            dataType: "json",
            success: function (result) {
             console.log(result);
             
             var html=template('navTemp',result);
             $('.mmb_nav>.nav').html(html);
            //  console.log($('.nav li'));
            //  console.log($('.nav li:nth-last-of-type(-n+4)'));
             $('.nav li:nth-child(n+9)').hide();
            }
        });
    }
    $('.nav').on('click','li:nth-child(8)',function() {
        $('.nav li:nth-child(n+9)').slideToggle();      
    })
    
    
    
    
  
     $.ajax({
         type: "get",
         url: "http://193.112.55.79:9090/api/getmoneyctrl",
         dataType: "json",
         success: function (res) {
             console.log(res);  
             var html=template('discountTemp',res.result);
            //  console.log(html)   
             $('.mmb_discount ul').html(html);
         }
     });


     $(".a-close").on('click',function(){
         $('.headelo').animate({height:0,padding:0},500,function(){
          
         })
     })
})
